#编写game.py脚本，实现以下目标：1.计算机随机出拳 2.玩家自己决定如何出拳 3.代码尽量简化
import random
player = int(input('请输入0剪刀、1石头、2布：'))
computer = random.randint(0,2) 
print("计算机出的是:",computer)
if player != 0 and player != 1 and player != 2:
    print("你输入错误！")
elif (player == 0 and computer == 2) or (player == 1 and computer == 0) or (player == 2 and computer == 1 ):
    print("你赢了")
elif player == computer:
    print("平局")
else:
    print("你输了")
